<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: helib::ModuliSizes Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehelib.html">helib</a></li><li class="navelem"><a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhelib_1_1_moduli_sizes-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">helib::ModuliSizes Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A helper class to map required modulo-sizes to primeSets.  
 <a href="classhelib_1_1_moduli_sizes.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="prime_chain_8h_source.html">primeChain.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a498f82c06da7dc977f99d215a35481c7"><td class="memItemLeft" align="right" valign="top">typedef std::pair&lt; double, <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a498f82c06da7dc977f99d215a35481c7">Entry</a></td></tr>
<tr class="separator:a498f82c06da7dc977f99d215a35481c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad621f5c0fa4ce4bf037888eadb7db437"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#ad621f5c0fa4ce4bf037888eadb7db437">init</a> (const std::vector&lt; <a class="el" href="classhelib_1_1_cmodulus.html">Cmodulus</a> &gt; &amp;chain, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;ctxtPrimes, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;smallPrimes)</td></tr>
<tr class="memdesc:ad621f5c0fa4ce4bf037888eadb7db437"><td class="mdescLeft">&#160;</td><td class="mdescRight">initialize helper table for a given chain  <a href="classhelib_1_1_moduli_sizes.html#ad621f5c0fa4ce4bf037888eadb7db437">More...</a><br /></td></tr>
<tr class="separator:ad621f5c0fa4ce4bf037888eadb7db437"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a744ed05c1fccbc830cecb135eb1e7047"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a744ed05c1fccbc830cecb135eb1e7047">getSet4Size</a> (double low, double high, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;fromSet, bool <a class="el" href="namespacehelib.html#a8dfd59b19280a7a98989bbc0dd6a8c2c">reverse</a>) const</td></tr>
<tr class="separator:a744ed05c1fccbc830cecb135eb1e7047"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad72b65db26245890642aa151343aa45d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#ad72b65db26245890642aa151343aa45d">getSet4Size</a> (double low, double high, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;from1, const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;from2, bool <a class="el" href="namespacehelib.html#a8dfd59b19280a7a98989bbc0dd6a8c2c">reverse</a>) const</td></tr>
<tr class="separator:ad72b65db26245890642aa151343aa45d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78e717d64823a8afe0b8c576cdbfd42d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a78e717d64823a8afe0b8c576cdbfd42d">read</a> (std::istream &amp;str)</td></tr>
<tr class="separator:a78e717d64823a8afe0b8c576cdbfd42d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ba402c9dcea5d4bf61bffe155ec031c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a8ba402c9dcea5d4bf61bffe155ec031c">write</a> (std::ostream &amp;str) const</td></tr>
<tr class="separator:a8ba402c9dcea5d4bf61bffe155ec031c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a24b050ab6dea3d2de34fc19b6de0c623"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a24b050ab6dea3d2de34fc19b6de0c623">operator&gt;&gt;</a> (std::istream &amp;s, <a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a> &amp;szs)</td></tr>
<tr class="separator:a24b050ab6dea3d2de34fc19b6de0c623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88a56d9aae0367fb953e7227d59c03ea"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_moduli_sizes.html#a88a56d9aae0367fb953e7227d59c03ea">operator&lt;&lt;</a> (std::ostream &amp;s, const <a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a> &amp;szs)</td></tr>
<tr class="separator:a88a56d9aae0367fb953e7227d59c03ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A helper class to map required modulo-sizes to primeSets. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a498f82c06da7dc977f99d215a35481c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a498f82c06da7dc977f99d215a35481c7">&#9670;&nbsp;</a></span>Entry</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::pair&lt;double, <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a>&gt; <a class="el" href="classhelib_1_1_moduli_sizes.html#a498f82c06da7dc977f99d215a35481c7">helib::ModuliSizes::Entry</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad72b65db26245890642aa151343aa45d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad72b65db26245890642aa151343aa45d">&#9670;&nbsp;</a></span>getSet4Size() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::ModuliSizes::getSet4Size </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>low</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>high</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>from1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>from2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reverse</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Find a suitable <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> of primes whose total size is in the target interval [low,high], trying to minimize the total number of primes dropped from both from1, from2. If no <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> exists that fits in the target interval, returns the <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> that gives the largest value smaller than low. (or the smallest value greater than low if reverse flag is set).</p>
<p>Find a suitable <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> of primes whose total size is in the target interval [low,high], trying to minimize the total number of primes dropped from both from1, from2. If no <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> exists that fits in the target interval, returns the <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> that gives the largest value smaller than low. </p>

</div>
</div>
<a id="a744ed05c1fccbc830cecb135eb1e7047"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744ed05c1fccbc830cecb135eb1e7047">&#9670;&nbsp;</a></span>getSet4Size() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> helib::ModuliSizes::getSet4Size </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>low</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>high</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>fromSet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reverse</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Find a suitable <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> of primes whose total size is in the target interval [low,high], trying to minimize the number of primes dropped from fromSet. If no <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> exists that fits in the target interval, returns the <a class="el" href="classhelib_1_1_index_set.html" title="A dynamic set of non-negative integers.">IndexSet</a> that gives the largest value smaller than low (or the smallest value greater than low if reverse flag is set). </p>

</div>
</div>
<a id="ad621f5c0fa4ce4bf037888eadb7db437"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad621f5c0fa4ce4bf037888eadb7db437">&#9670;&nbsp;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::ModuliSizes::init </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="classhelib_1_1_cmodulus.html">Cmodulus</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>chain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>ctxtPrimes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_index_set.html">IndexSet</a> &amp;&#160;</td>
          <td class="paramname"><em>smallPrimes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>initialize helper table for a given chain </p>

</div>
</div>
<a id="a78e717d64823a8afe0b8c576cdbfd42d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78e717d64823a8afe0b8c576cdbfd42d">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::ModuliSizes::read </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8ba402c9dcea5d4bf61bffe155ec031c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ba402c9dcea5d4bf61bffe155ec031c">&#9670;&nbsp;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::ModuliSizes::write </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a88a56d9aae0367fb953e7227d59c03ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88a56d9aae0367fb953e7227d59c03ea">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a> &amp;&#160;</td>
          <td class="paramname"><em>szs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a24b050ab6dea3d2de34fc19b6de0c623"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24b050ab6dea3d2de34fc19b6de0c623">&#9670;&nbsp;</a></span>operator&gt;&gt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_moduli_sizes.html">ModuliSizes</a> &amp;&#160;</td>
          <td class="paramname"><em>szs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/HElib/include/helib/<a class="el" href="prime_chain_8h_source.html">primeChain.h</a></li>
<li>/HElib/src/<a class="el" href="prime_chain_8cpp.html">primeChain.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
